<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:shmp_styles="clr-namespace:SharpMap.Styles;assembly=SharpMap"
  	xmlns:reflect="clr-namespace:System.Reflection;assembly=mscorlib"
    xmlns:local="clr-namespace:SharpMap.Presentation.Wpf">
    <Style TargetType="{x:Type local:LayerStyleView}">
        <Style.Resources>
            <ResourceDictionary Source="/SharpMap.Presentation.Wpf;component/ControlStyles/MapStylesDataTemplates.xaml"/>
        </Style.Resources>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type local:LayerStyleView}">
                    <ControlTemplate.Resources>
                        <ResourceDictionary>
                            <ResourceDictionary.MergedDictionaries>
                                <ResourceDictionary Source="/SharpMap.Presentation.Wpf;component/ControlStyles/GroupStyles.xaml"/>
                            </ResourceDictionary.MergedDictionaries>
                        </ResourceDictionary>
                    </ControlTemplate.Resources>
                        <Border Background="{TemplateBinding Background}"
                            BorderBrush="{TemplateBinding BorderBrush}"
                            BorderThickness="{TemplateBinding BorderThickness}">
                  
                       <local:StyleEntriesList 
                           x:Name="Part_StyleItemsList" 
                           ItemsSource="{Binding StyleList}" 
                           >
                              <ListView.View>
                                <GridView>
                                    <GridViewColumn Header="Name" 
                                                    DisplayMemberBinding="{Binding Name}"/>
                                    <GridViewColumn Header="Value">
                                        <GridViewColumn.CellTemplate>
                                            <DataTemplate>
                                                <ContentPresenter Content="{Binding}"/>
                                            </DataTemplate>
                                        </GridViewColumn.CellTemplate>
                                    </GridViewColumn>
                                </GridView>
                            </ListView.View>
                            <ListView.GroupStyle>
                                <StaticResource ResourceKey="expanderGroupStyle"/>
                            </ListView.GroupStyle>
                        </local:StyleEntriesList >
                    </Border>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
</ResourceDictionary>

